extends Control
signal scoreReset
var is_paused=false
# Called when the node enters the scene tree for the first time.
func _ready():
	pass # Replace with function body.


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
	if Input.is_action_just_pressed("pause"):
		if is_paused:
			is_paused =false
			visible=is_paused
			get_tree().paused =is_paused
		else: 
			is_paused =true
			get_tree().paused =is_paused
			visible=is_paused



func _on_resume_pressed():
	is_paused =false
	visible=is_paused
	get_tree().paused =is_paused


func _on_restart_pressed():
	is_paused=false
	get_tree().paused=is_paused
	visible = is_paused
	scoreReset.emit()



func _on_quit_pressed():
	get_tree().quit()
